package org.leetcode.easy;

import org.junit.Test;
import java.util.Arrays;

public class IsAnagram {
        public boolean isAnagram(String s, String t) {
            if (s.length() != t.length()) {
                return false;
            }
            char[] str1 = s.toCharArray();
            char[] str2 = t.toCharArray();
            Arrays.sort(str1);
            Arrays.sort(str2);
            return Arrays.equals(str1, str2);
        }


    @Test
    public void test() {
        String s = "aa";
        String t = "bb";
        System.out.println(isAnagram(s, t));
    }
}
